home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / util / wb / DosMan121.lha / man / Copy < prev    next >
Text File  |  1995-05-19  |  10KB  |  255 lines

  1.  
  2.  
  3.  
  4.             Copy(V1.3,2.x,3.x) (in the C: directory))
  5.  
  6.  
  7.  
  8.      NAME
  9.           Copy - Copy files.
  10.  
  11.      SYNOPSIS
  12.           Copy From To ALL QUIET BUF=BUFFER CLONE DATES
  13.                NOPRO COM FLAGS QUICK
  14.  
  15.      DESCRIPTION
  16.             COPY duplicates the contents of the file or files (if 
  17.         wildcards or a directory is given) of its FROM argument 
  18.         to the file or directory specified in its TO argument, 
  19.         overwriting any existing file or files of the same names.
  20.  
  21.      FILE SPECIFICATION
  22.             The From argument may be a file, a directory or a 
  23.         wildcard pattern.  You can use a dot '.' as either the 
  24.         From or To directory to indicate the current directory. 
  25.         Double quotes "" can be used  to refer to the current 
  26.         directory.
  27.  
  28.             If you copy a file, you may give that file the same 
  29.         name or a different name as the original. If the 
  30.         destination has the same name as the original then the 
  31.         new copy will replace it.
  32.  
  33.             Copy can duplicate many copies of a file to the same 
  34.         directory if dirrerent names are used. It can also 
  35.         duplicate files to many different directories.
  36.  
  37.             If the From argument is a directory or a pattern, the 
  38.         To argument is assumed to be a directory or destination 
  39.         replacement pattern.  If the directory specified in the 
  40.         To argument does not exist, it will be created for you.
  41.  
  42.             If you include wildcard characters in the To 
  43.         argument, these are taken to be a request to use a 
  44.         pattern substitution for the destination filename.  The 
  45.         expected syntax is:
  46.  
  47.           <optional_prefix>|<optional_postfix>
  48.  
  49.             You may specify neither, one, or both of these 
  50.         optional tags.  If you exceed the length of an AmigaDOS 
  51.         filename (30 characters as of this writing) the name will 
  52.         be silently truncated. 
  53.  
  54.             You can also indicate which portion of the From 
  55.         filename you want to be replaced by using the wildcard 
  56.         characters in the source pattern.    As an example, the 
  57.         command:
  58.  
  59.              Copy l#? TO Ram:
  60.  
  61.         will copy all files beginning with an 'l' to the Ram:
  62.         directory.  
  63.  
  64.             In 1.3 you CANNOT use wildcards for Directory names, 
  65.         only file names. 2.x/3.x allows this.
  66.  
  67.             1.3 will not let you copy a file to a directory that 
  68.         does not exist. In 2.x/3.x COPY will create a directory 
  69.         if one does not exist.
  70.  
  71.             If you copy a file to the same directory it cannot 
  72.         have a file with that same name of the protection bit is 
  73.         set on the file being copied to. 
  74.  
  75.             The from statement is not needed as long as the 
  76.         source and target files are in the appropriate order. If 
  77.         the orders are changed (Copy To filename FROM filename), 
  78.         the FROM is required.
  79.  
  80.             If you don't specify a directory, but the TO keyword 
  81.         is used, then the current directory is copied to the 
  82.         destination.  For instance, COPY TO Work: will copy the 
  83.         entire contents of the current directory to Work:.
  84.           
  85.             Devices such as PRT: and SPEAK: can be designated as 
  86.         the destination of any file being copied.
  87.  
  88.             2.x/3.x Only: You can chose multiple FROM files as 
  89.         well as multiple TO files. 
  90.  
  91.  
  92.      OPTIONS
  93.           ALL 
  94.             Copies ALL the files from the source directory to the 
  95.         destination directory or device.  This will recursively 
  96.         descend all subdirectories found in the From directory, 
  97.         and create them (if they do not already exist) in the To 
  98.         directory.  Without this switch, only the first level of 
  99.         the directory hierarchy will be duplicated.
  100.  
  101.           QUIET
  102.             Performs a Copy without reporting what it is doing.  
  103.         This is useful for doing copies in the background, when 
  104.         you do not wish to be disturbed by informative messages.  
  105.         Note that errors will still be reported.
  106.  
  107.           BUF=BUFFER
  108.             This allows you to specify the number of 512 byte 
  109.         buffers used during the copy. Unlike the Commodore Copy, 
  110.         which uses a fixed number of buffers if this option is 
  111.         not specified (currently, 200 buffers), the ARP Copy sets 
  112.         its internal buffer size intelligently as a function of 
  113.         how much memory your system contains and the size of the 
  114.         file to be copied.  Using this option overrides this 
  115.         intelligent behavior.
  116.  
  117.           CLONE
  118.             This instructs Copy to duplicate the date, comments 
  119.         and protection bits (except the archive bit) of the 
  120.         original file.  The default is to Copy only the 
  121.         protection bits. (also see Environment, below).  This is 
  122.         the same as using both the DATE and COM keywords.
  123.  
  124.           DATE
  125.             This option instructs Copy to duplicate the datestamp 
  126.         (also see Environment, below).
  127.  
  128.           NOPRO
  129.             By default, Copy duplicates the protection bits of 
  130.         the file(s) (except the archive bit).  Using this option 
  131.         will override this behavior, and cause the file to be 
  132.         created with the current system default protection (also 
  133.         see Environment, below).
  134.  
  135.           COM  
  136.             This forces Copy to duplicate the comment for the 
  137.         file.  The default is not to duplicate the comment (also 
  138.         see Environment, below).
  139.  
  140.           QUICK
  141.             This ARP addition is a highly useful option which 
  142.         will duplicate files only if the destination file does 
  143.         not exist or is not the same. Copy uses the Datestamp, 
  144.         Filesize, Protect bits, and also the Filenote (but only 
  145.         if you have enabled copying filenotes) to determine 
  146.         whether or not the file is the same. Since a byte by byte 
  147.         compare is not done, it is possible to fool Copy.  
  148.         However, in normal operation of the Amiga, this 
  149.         dramatically speeds up Copies between directories and is 
  150.         perfectly safe (also see Environment, below).
  151.  
  152.           FLAGS
  153.  
  154.             You can override the current setting of your 
  155.         environment flags using this keyword.  Any option 
  156.         specified on the command line overrides the default 
  157.         settings specified by the copyflags environment variable. 
  158.         This keyword takes a string of the same type used for the 
  159.         copyflags variable.  For a discussion of these flags, see 
  160.         Environment, below.
  161.  
  162.           NOREQ
  163.  
  164.             Normally, whenever you try to copy to a directory 
  165.         that does not exist a requestor will pop up asking you to 
  166.         insert it.  If you do not want that little requestor, 
  167.         then use this keyword. This is useful for when you want 
  168.         to write a script for someone else who does not have a 
  169.         device you want to try to copy to (such as a printer or a 
  170.         speech device- speech devices were removed from the 
  171.         Workbench with 2.0). 
  172.  
  173.      ENVIRONMENT
  174.             If you prefer a behavior for copy other than the 
  175.         default, you can specify this behavior permanently by 
  176.         setting a value for the copyflags environment variable.  
  177.         This variable takes a string of characters composed of 
  178.         the following:
  179.  
  180.           N    Always copy filenotes (see COM, above).
  181.  
  182.           C    Always copy original datestamp (see DATES, above).
  183.  
  184.           Q    Always copy QUICK (see QUICK, above).
  185.  
  186.           P    Never copy protection flags (see NOPRO, above).
  187.  
  188.           O    This flag does not correspond to any command line
  189.                arguments.  When this flag is set, Copy will only
  190.                duplicate files which already exist in the destination
  191.                directory, it stands for 'OLD', and essentially
  192.                performs an update operation.  This is extremely useful
  193.                when trying to update old software with new software.
  194.  
  195.             These flags can be overridden by using a command line 
  196.         option, or by using the FLAGS keyword to specify new 
  197.         ones.  Note also that case is not significant.  You can 
  198.         set the copyflags variable using Set, SetEnv, or directly 
  199.         from the command line if you are using the Shell instead
  200.         of the CLI.
  201.  
  202.              Set copyflags=CQ
  203.              SetEnv copyflags=CQ
  204.             
  205.             The settings shown above is perhaps the most common: 
  206.         it enables copying datestamps, protection bits, and the 
  207.         QUICK option.
  208.  
  209.      EXAMPLE
  210.             1. To perform an update from one directory to another 
  211.         without using copyflags, use:
  212.  
  213.           Copy NewDir OldDir FLAGS=O
  214.  
  215.           
  216.             2. To copy a file called TheFile to OtherFile in the 
  217.         same dir:
  218.  
  219.           Copy TheFile Otherfile
  220.             or
  221.           Copy TheFile to Otherfile
  222.             or
  223.           Copy To Otherfile From TheFile
  224.  
  225.  
  226.             3. To copy all the files from Df0: to Work:
  227.  
  228.           Copy Work: df0:
  229.  
  230.  
  231.             4. To copy all files and subdirectories from df0: to 
  232.         Work:
  233.  
  234.           Copy Df0: Work: ALL
  235.  
  236.  
  237.             5. Copy all the files in the current directory to 
  238.         Ram:
  239.  
  240.           Copy "" Ram:
  241.  
  242.         
  243.             6. To Copy a file called Dudes in the current 
  244.         directory to a file with the same name to a directory 
  245.         called :WildWest/Cowboys, which is on the same disk:
  246.  
  247.           Copy Dudes :WildWest/Cowboys
  248.  
  249.  
  250.             7. To Copy selected files from the current directory 
  251.         to the Stuff: directory.
  252.  
  253.           Copy "" Stuff:
  254.  
  255.